package com.ruoyi.project.easyexcel.AsyncTask;

import com.ruoyi.project.easyexcel.service.TloosService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletResponse;

/**
 * @Author huyunqiang
 * @Description
 * @Date 2023/9/8 10:52
 **/
@Component
@EnableAsync
@Slf4j
public class ExcelTask {

    @Autowired
    TloosService tloosService;

    @Async
    public void exportExcel(HttpServletResponse response){
        tloosService.exportExcel(response);
    }

}
